﻿CREATE PROCEDURE _Views
as
/*
CREATE VIEW [dbo].[V_e1]
AS
SELECT     E_Gr1_ID, Paragraf, E_Gr1_CD, E_Gr1_RL
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\E_GR1_CLASS.xls', 'SELECT * FROM [Запрос13$]') 
                      AS derivedtbl_1
CREATE VIEW [dbo].[V_e2]
AS
SELECT     E_Gr2_ID, E_Gr2_CD, E_Gr1_ID, E_Gr2_RL
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\E_GR2_CLASS.xls', 'SELECT * FROM [Запрос13$]') 
                      AS derivedtbl_1


CREATE VIEW [dbo].[V_e3]
AS
SELECT     ECON_ID, E_GR_2_ID, ECON_Trea, ECON_CD, ECON_RL
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\E_GR3_CLASS.xls', 'SELECT * FROM [Запрос13$]') 
                      AS derivedtbl_1

CREATE VIEW [dbo].[V_f1]
AS
SELECT     SECTOR_CD, FunIMFID, SR
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\TBL_SECTOR.xls', 'SELECT * FROM [Запрос13$]') 
                      AS derivedtbl_1


CREATE VIEW [dbo].[V_f2]
AS
SELECT     SUBSECTOR_CD, FunIMFID, SECTOR_CD, SSR
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\TBL_SUBSECTOR.xls', 
                      'SELECT * FROM [Запрос13$]') AS derivedtbl_1


CREATE VIEW [dbo].[V_f3]
AS
SELECT     FUNC_CD, FunIMFID, SUBSECTOR_CD, FR
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\TBL_FUNCTION.xls', 
                      'SELECT * FROM [Запрос13$]') AS derivedtbl_1


CREATE VIEW [dbo].[V_v1]
AS
SELECT     KBOCode, VE, KBORL, Typ
FROM         OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Projects\TIMS\Tims200805\NSI_TBS\TBL_KBO_DESCRIPTION.xls', 
                      'SELECT * FROM [Запрос13$]') AS derivedtbl_1
*/


